/* 变量定义 */
:root {
    --primary-color: #4a90e2;
    --primary-light: #6ba4e7;
    --primary-dark: #357abd;
    --course-required: #e74c3c;
    --course-optional: #2ecc71;
    --course-lab: #f1c40f;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6fa;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* 容器样式 */
.timetableContainer {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
}

/* 课表网格布局 */
.timetable {
    display: grid;
    grid-template-columns: 120px repeat(6, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* 时间列样式 */
.timeColumn {
    background-color: var(--bg-secondary);
}

.cornerCell {
    height: 60px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.timeCell {
    height: 120px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.period {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 日期列样式 */
.dayColumn {
    background-color: var(--bg-primary);
}

.dayHeader {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.cell {
    height: 120px;
    padding: 4px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.currentTimeSlot {
    background-color: rgba(74, 144, 226, 0.1);
}

/* 课程卡片样式 */
.courseCard {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 4px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.courseCard:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.courseName {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.courseInfo {
    font-size: 12px;
    margin: 2px 0;
    color: var(--text-secondary);
}

.courseDuration {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed var(--border-color);
}

/* 课程类型样式 */
.requiredCourse {
    border-left: 4px solid var(--course-required);
}

.optionalCourse {
    border-left: 4px solid var(--course-optional);
}

.labCourse {
    border-left: 4px solid var(--course-lab);
}

.defaultCourse {
    border-left: 4px solid var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .timetableContainer {
        padding: 10px;
    }

    .timetable {
        grid-template-columns: 100px repeat(6, 1fr);
    }

    .timeCell,
    .cell {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .timetable {
        grid-template-columns: 80px repeat(6, 1fr);
    }

    .timeCell,
    .cell {
        height: 80px;
    }

    .courseName {
        font-size: 12px;
    }

    .courseInfo {
        font-size: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timetableContainer {
    animation: fadeIn 0.5s ease-out;
}